Init the InfoBar message_type to GTK_MESSAGE_OTHER
authorPaolo Borelli <pborelli@gnome.org>
Thu, 23 Feb 2012 23:16:33 +0000 (00:16 +0100)
committerPaolo Borelli <pborelli@gnome.org>
Fri, 24 Feb 2012 07:13:47 +0000 (08:13 +0100)
In this way the the code executed when the message_type property is set
to its default value (which is 0) gets actually run.

gtk/gtkinfobar.c

index 7972605517502159e1dad6ddcadae8095c6ff28f..88d6046fce44b4a6c85cbea4d1552d19eb173c61 100644 (file)
@@ -539,6 +539,11 @@ gtk_info_bar_init (GtkInfoBar *info_bar)
   info_bar->priv->content_area = content_area;
   info_bar->priv->action_area = action_area;
 
+  /* message-type is a CONSTRUCT property, so we init to a value
+   * different from its default to trigger its property setter
+   * during construction */
+  info_bar->priv->message_type = GTK_MESSAGE_OTHER;
+
   gtk_widget_pop_composite_child ();
 
   gtk_info_bar_style_updated (widget);